//引入mongoose
let mongoose = require('mongoose');
//创建目标集合模型对象
let testedsSchema = mongoose.Schema({
    studentId: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'studentsModel'
    },
    testId: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'testsModel'
    },
    typeId:
    {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'typesModel'
    },
    answers: [[Number]],
    accuracy: String,
    score: Number,
    durations: String
});
//建立目标模型对象与目标集合的关联关系
mongoose.model('testedsModel', testedsSchema, 'testeds');